Repository navigation
Move Reply and ToolCall fields by value in harness-gateway-client - #92
Merged
Merged
Conversation
Update `gateway-client` in `Cargo.toml` and `Cargo.lock` to `46ead80f5f2f16677a6a4d6530d9e37271bebfff` and change `into_engine_reply` in `crates/harness-gateway-client/src/convert.rs` to take `Reply` by value. Destructure `Reply` and move `outcome`, `model`, `finish_reason`, `reasoning`, `request`, `response`, and each `ToolCall` field directly into `Completion` and `RawExchange` without cloning. - Update the call sites in `crates/harness-gateway-client/src/broker.rs` and `crates/harness-gateway-client/src/convert-tests-reply.rs` to pass `Reply` by value. - `diagnostics` still runs each line through `bound_diagnostic` so diagnostics stay bounded and control-escaped.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
gateway-clientto46ead80f5f2f16677a6a4d6530d9e37271bebfff(Make Reply and ToolCall fields public for zero-clone ownership transfer gateway-client#5).into_engine_replyincrates/harness-gateway-client/src/convert.rsto takeReplyby value and destructure it, movingoutcome,model,finish_reason,reasoning,request,response, and eachToolCall'sid,name, andargumentsdirectly intoCompletionandRawExchangewith zero clones.crates/harness-gateway-client/src/broker.rsandcrates/harness-gateway-client/src/convert-tests-reply.rs.Verification
cargo fmt --all --checkCARGO_BUILD_WARNINGS=deny cargo clippy -p harness-gateway-client --all-targets --all-featurescargo nextest run -p harness-gateway-client(42/42 passed, 2 skipped)RUSTDOCFLAGS="-D warnings" cargo doc -p harness-gateway-client --no-deps --all-featurescargo deny checkSummary by CodeRabbit